/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.Provisioning.Result;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class CheckAuthConfig
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 41 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/*    */     
/* 43 */     String name = request.getAttribute("name").toLowerCase();
/* 44 */     String password = request.getAttribute("password");
/* 45 */     Map attrs = AdminService.getAttrs(request, true);
/*    */     
/* 47 */     Element response = zsc.createElement(AdminConstants.CHECK_AUTH_CONFIG_RESPONSE);
/* 48 */     Provisioning.Result r = Provisioning.getInstance().checkAuthConfig(attrs, name, password);
/*    */     
/* 50 */     response.addElement("code").addText(r.getCode());
/* 51 */     String message = r.getMessage();
/* 52 */     if (message != null)
/* 53 */       response.addElement("message").addText(message);
/* 54 */     response.addElement("bindDn").addText(r.getComputedDn());
/*    */     
/* 56 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 61 */     notes.add("Do not need any right, all admins are allowed.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/CheckAuthConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */